import request from '@/utils/request'

// 公告相关
/**
 * @description: 获取公告
 * @return {*} promise
 */
export function getAnnouncementAPI() {
  return request({
    url: '/announcements',
    method: 'GET',
  })
}

/**
 * @description: 发布公告
 * @return {*} promise
 */
export function issueAnnouncementAPI(data) {
  return request({
    url: '/announcements',
    method: 'POST',
    data
  })
}

/**
 * @description: 删除公告
 * @return {*} promise
 */
export function delAnnouncementAPI(id) {
  return request({
    url: '/announcements/' + id,
    method: 'DELETE',
  })
}

/**
 * @description: 修改公告
 * @return {*} promise
 */
export function modifyAnnouncementAPI(id,data) {
  return request({
    url: '/announcements/' + id,
    method: 'PUT',
    data
  })
}

